package com.lkm.market2_0.steelyard;

import com.lkm.market2_0.m.imple.steelyardserver.SteelyardServerModuleBase;
import com.lkm.market2_0.m.steelyardstatus.SteelyardStatusManagerModule;

public class SteelyardServerModuleBluetooth extends SteelyardServerModuleBase {

    private BluetoothCom bluetoothCom;

    public SteelyardServerModuleBluetooth(SteelyardStatusManagerModule steelyardStatusManagerModule) {
        super(steelyardStatusManagerModule);
        bluetoothCom = new BluetoothCom(this);
    }

    @Override
    protected void init() {

    }

    public boolean startServer(String bluetoothAddress) {
        if(!bluetoothCom.setBluetoothAddress(bluetoothAddress))
            return false;

        bluetoothCom.connect();
        return true;
    }
    public void stopServer() {
        bluetoothCom.disConnect();
    }
}
